﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Remoting.Messaging;

namespace MessageCallAspect.UnitTest
{
    public class MockMessageSink : IMessageSink
    {
        public static List<int> OrderList = new List<int>();

        #region IMessageSink Members

        public IMessageCtrl AsyncProcessMessage(IMessage msg, IMessageSink replySink)
        {
            throw new NotImplementedException();
        }

        public IMessageSink NextSink
        {
            get;
            set;
        }

        public IMessage SyncProcessMessage(IMessage msg)
        {
            CallCount++;
            OrderList.Add(Order);
            return NextSink.SyncProcessMessage(msg);
        }

        #endregion

        public int CallCount { get; private set; }
        public int Order
        {
            get;
            set;
        }
    }
}
